// #include "../include/log/logger.hpp"

// // #### local_builder && logger_sync

// void test1()
// {
//     log_system::LoggerDirector director("test1_logger", log_system::LoggerDirector::BuilderCategory::LOCAL_BUILDER, log_system::LoggerBuilder::LOGGER_SYNC, log_system::LogLevel::DEBUG);
//     log_system::LogSinkSet set(director.getLoggerBuilder()); // log sink set 
//     set.set(log_system::StdoutLogSink()); // set stdout log sink
//     set.set(log_system::SpecifyFileLogSink(), "./logfile/test1.log"); // set specify file log sink
//     director.create(); // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

//     director.getLogger()->info(__FILE__, __LINE__, "%s", "scope : test1()");
//     director.getLogger()->debug(__FILE__, __LINE__, "%s", "scope : test1()");
// }

// void test2()
// {
//     log_system::LoggerDirector director("test2_logger", log_system::LoggerDirector::BuilderCategory::LOCAL_BUILDER, log_system::LoggerBuilder::LOGGER_SYNC, log_system::LogLevel::DEBUG);
//     log_system::LogSinkSet set(director.getLoggerBuilder());
//     set.set(log_system::StdoutLogSink()); // set stdout log sink
//     set.set(log_system::SpecifyFileLogSink(), "./logfile/test2.log"); // set specify file log sink
//     director.create(); // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

//     director.getLogger()->info(__FILE__, __LINE__, "%s", "scope : test2()");
//     director.getLogger()->debug(__FILE__, __LINE__, "%s", "scope : test2()");
// }

// int main()
// {
//     test1();
//     test2();
// }



// #include "../include/log/logger.hpp"

// // #### local_builder && logger_sync

// void test1()
// {
//     log_system::LoggerDirector director("test1_logger", log_system::LoggerDirector::BuilderCategory::LOCAL_BUILDER, log_system::LoggerBuilder::LOGGER_ASYNC, log_system::LogLevel::DEBUG);
//     log_system::LogSinkSet set(director.getLoggerBuilder()); // log sink set 
//     set.set(log_system::StdoutLogSink()); // set stdout log sink
//     set.set(log_system::SpecifyFileLogSink(), "./logfile/test1.log"); // set specify file log sink
//     director.create(); // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

//     director.getLogger()->info(__FILE__, __LINE__, "%s", "scope : test1()");
//     director.getLogger()->debug(__FILE__, __LINE__, "%s", "scope : test1()");
// }

// void test2()
// {
//     log_system::LoggerDirector director("test2_logger", log_system::LoggerDirector::BuilderCategory::LOCAL_BUILDER, log_system::LoggerBuilder::LOGGER_ASYNC, log_system::LogLevel::DEBUG);
//     log_system::LogSinkSet set(director.getLoggerBuilder()); // log sink set 
//     set.set(log_system::StdoutLogSink()); // set stdout log sink
//     set.set(log_system::SpecifyFileLogSink(), "./logfile/test2.log"); // set specify file log sink
//     director.create(); // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

//     director.getLogger()->info(__FILE__, __LINE__, "%s", "scope : test2()");
//     director.getLogger()->debug(__FILE__, __LINE__, "%s", "scope : test2()");
// }

// int main()
// {
//     test1();
//     test2();
// }


// #include "../include/log/log_system.hpp"

// class Base
// {
// public:
//     Base()
//     {
//         INFO("%s", "Base class constructor done!!!"); //  first print log mode
//     }

//     ~Base()
//     {
//         INFO("%s", "Base class destructor done!!!"); 
//     }

// }; // class Base

// int main()
// {
//     log_system::LoggerDirector director("master", log_system::LoggerDirector::BuilderCategory::GLOBAL_BUILDER, log_system::LoggerBuilder::LOGGER_SYNC, log_system::LogLevel::DEBUG);
//     log_system::LogSinkSet set(director.getLoggerBuilder()); // log sink set 
//     set.set(log_system::StdoutLogSink()); // set stdout log sink
//     set.set(log_system::SpecifyFileLogSink(), "./logfile/test2.log"); // set specify file log sink
//      set.set(log_system::ScrollFileBySizeLogSink(), "./scroll/scrollBySize-", 1024 * 1024); // set scroll file by size log sink
//     set.set(log_system::ScrollFileBySizeLogSink(), "./scroll/scrollByTimeBySecond-", log_system::ScrollFileByTimeLogSink::TimeGap::GAP_SECOND); // set scroll file by time(second) log sink
    
//     director.create(); // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

// }



#include "../include/log/logger.hpp"

class Base
{
public:
    Base()
    {
        log_system::LoggerManager::getInstance().getLogger("master")->info(__FILE__, __LINE__, "%s", "Base class constructor done!!!");
    }

    ~Base()
    {
        log_system::LoggerManager::getInstance().getLogger("master")->info(__FILE__, __LINE__, "%s", "Base class destrutor done!!!");
    }

}; // class Base

int main()
{
    log_system::LoggerDirector director("master", log_system::LoggerDirector::BuilderCategory::GLOBAL_BUILDER, log_system::LoggerBuilder::LOGGER_SYNC, log_system::LogLevel::DEBUG);
    log_system::LogSinkSet set(director.getLoggerBuilder());          // log sink set
    set.set(log_system::StdoutLogSink());                             // set stdout log sink
    set.set(log_system::SpecifyFileLogSink(), "./logfile/test2.log"); // set specify file log sink
    set.set(log_system::ScrollFileBySizeLogSink(), "./scroll/scrollBySize-", 1024 * 1024); // set scroll file by size log sink
    set.set(log_system::ScrollFileByTimeLogSink(), "./scroll/scrollByTimeBySecond-", log_system::ScrollFileByTimeLogSink::TimeGap::GAP_SECOND); // set scroll file by time(second) log sink

    director.create();                                                // Pass the set log receiving mode, Logger name, restriction level, and formatter to the Logger class

    Base b;
}
